home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #3
/
Amiga Plus CD - 2002 - No. 03.iso
/
AmiSoft
/
Util
/
Misc
/
Lottery2002.lha
/
Lottery2002
/
Source
/
common.c
next >
Wrap
C/C++ Source or Header
|
2001-01-25
|
1KB
|
48 lines
/* common.c */
#include "includes.h"
#include "externals.h"
/* requester, putbusy, clearbusy
these function's are used by most of the modules */
/* Puts up a requester using easy request */
long requester (char *title, char *text, char *buttons)
{
struct EasyStruct myES =
{
sizeof(struct EasyStruct),
0,
title,
"%s",
"%s"
};
return(EasyRequest(NULL, &myES, NULL, text, buttons));
}
/* ---------------------------------------------------------------------- */
/* To use set up as follow's **
** struct Requester myreq; **
** putbusy(win, &myreq); **
** then to clear **
** clearbusy(win, &myreq); */
/* Puts up a busy pointer & blocks window input */
void putbusy(struct Window *win)
{
SetWindowTitles(win, (UBYTE *)-1, g_scrtitle);
InitRequester(&myreq);
if (Request(&myreq, win))
{
SetWindowPointer(win, WA_BusyPointer, TRUE,
WA_PointerDelay, TRUE,
TAG_END);
}
}
/* ---------------------------------------------------------------------- */
/* Clears busy pointer & allows window input */
void clearbusy(struct Window *win)
{
ClearPointer(win);
EndRequest(&myreq, win);
}